import Vue from 'vue'
import Router from 'vue-router'
// import HelloWorld from '@/components/HelloWorld'

Vue.use(Router)

export default new Router({
  scrollBehavior: () => ({y: 0}),
  routes: [
    {
      path: '*',
      redirect: '/'
    },
    // {
    //   path: '/',
    //   name: 'login',
    //   component: resolve => require(['../views/home/login'], resolve).default,
    // },
    {
      path: '/',  /* 一级菜单 */
      component: resolve => require(['../views/main/main'], resolve),
      children:[
        {
          path: '/game',    /*二级菜单 */
          name: 'game',
          component: resolve => require(['../views/main/game'], resolve),
          children:[
            {
              path: '/gamedetail',    /*票种 */
              name: 'gamedetail',
              component: resolve => require(['../views/main/gamedetail'], resolve),
            },
          ]
        },
        
      ]
    },
    // {
    //   path: '/agree',  //用户协议
    //   name: 'agree',
    //   component: resolve => require(['../views/home/agree'], resolve).default,
    // },


  ]
})

